package com.zhiyi.coco.service.impl;

import com.zhiyi.coco.dao.TypeMapper;
import com.zhiyi.coco.entity.Type;
import com.zhiyi.coco.service.TypeService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
@Log4j
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper mapper;

    @Override
    public List<Type> getAllType() {
        return mapper.getAllType();
    }

    @Override
    public Type getInfoById(Integer id) {
        return mapper.selectByPrimaryKey(id);
    }
}
